import { nanoid } from "nanoid";

// 封装一个函数，用于生成用户临时id
export default function userTempId() {
    let userTempId = localStorage.getItem("userTempId");
    if (!userTempId) {
        userTempId = nanoid();
        localStorage.setItem("userTempId", userTempId);
    }
    return userTempId;
}
